| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | List of all members
nkMemory::DefaultAllocator< T > Class Template Referencefinal

A utility default allocator allocating an object through a simple call to new. More...

Inheritance diagram for nkMemory::DefaultAllocator< T >:

## Public Member Functions
| DefaultAllocator () noexcept=default
virtual | ~DefaultAllocator ()=default
virtual T * | allocate () override
Public Member Functions inherited from nkMemory::Allocator< T >
| Allocator () noexcept=default
virtual | ~Allocator ()=default

## Detailed Description

### template<typename T>
class nkMemory::DefaultAllocator< T >

A utility default allocator allocating an object through a simple call to new.

## Constructor & Destructor Documentation

## ◆ DefaultAllocator()

template<typename T >

nkMemory::DefaultAllocator< T >::DefaultAllocator | ( |  | ) |
| default noexcept

Constructor.

## ◆ ~DefaultAllocator()

template<typename T >

virtual nkMemory::DefaultAllocator< T >::~DefaultAllocator | ( |  | ) |
| virtual default

Destructor.

## Member Function Documentation

## ◆ allocate()

template<typename T >

virtual T* nkMemory::DefaultAllocator< T >::allocate | ( |  | ) |
| override virtual

Allocates using the new operator. If a more complex behaviour is needed, external code needs to implement their own Allocator.

Returns
  A newly allocated object.

Implements nkMemory::Allocator< T >.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsMemory/Allocators/DefaultAllocator.h